home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98b.txt
/
000119_icon-group-sender _Tue Jun 30 08:00:26 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id IAA28495
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Tue, 30 Jun 1998 08:00:25 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA01984; Tue, 30 Jun 1998 08:00:13 -0700
Message-Id: <35985E94.B8AC0267@ix.netcom.com>
Date: Mon, 29 Jun 1998 23:42:12 -0400
From: Phillip Lee Thomas <teruthom@ix.netcom.com>
Reply-To: thomaspl@acm.org
X-Mailer: Mozilla 4.05 [en] (Win95; U)
Mime-Version: 1.0
To: icon-group@optima.CS.Arizona.EDU
Subject: Re: Retrieving lists from tables
References: <35970078.4332DA12@ix.netcom.com> <3597BA27.532@gte.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 645
After pondering the solutions sent in, the following appears to involve the
least processing without making the code absolutely undebugable:
record ref(L,part1,part2) # keep list as first element of record
.....
t := table()
hashval := hash(L)
if \t[hashval] then
t[hashval].part1 +:= 1
else
t[hashval] := ref(L,1,1)
....
# later retrieval of the list for further processing can be done through
# converting the table to a sorted list or whatever is appropriate.
procedure hash(L)
# return some string unique to each list L
end
Thanks again to all who responded.
Phillip